import request from '@/utils/request'
// import EmployeeEnum from '@/constant/employees.vue'

/**
 * @description: 获取员工列表
 * @param {*} params {page:当前页,size：每页条数}
 * @return {*}
 */

export function getEmployeess(params) {
  return request({
    method: 'get',
    url: '/sys/user',
    'params': params
  })
}

/** 添加员工信息
* @description:
* @param {type}
* @return:
*/

export function addEmployees(data) {
  return request({
    method: 'post',
    url: '/sys/user',
    data
  })
}
export function deleteRole(id) {
  return request({
    method: 'delete',
    url: `/sys/user/${id}`

  })
}

export function getEmploys(id) {
  return request.get(`/sys/user/${id}`)
}

export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}
// 更新员工信息
export function getEmployeeDetail(data) {
  return request.put('/sys/user/' + data.id, data)
}

